#include "DCLQueue.h"
#include<stdio.h>
#include<stdlib.h>

int InitDCLQueue(DCLQueue *lq)
{
    return InitDCLinkList(&lq->queue);
}

void DCLQPush(DCLQueue *lq, ElementType element)
{
    InsertTail(&lq->queue,element);
}

// 自己写的
ElementType *DCLQPop(DCLQueue *lq)
{
    if(lq->queue.len==0)
    {
        printf("the queue is empty!\n");
        return NULL;
    }
    lq->FrontData=lq->queue.head->data;
    RemoveByIndex(&lq->queue,0);
    return &lq->FrontData;
}
